package cn.tedu.demo1.cn.tedu;

import cn.tedu.demo1.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

//使用此诸结相当于每个方法上面都添加了一个ResponseBody
@RestController
public class InfoController {
    @RequestMapping(path = "/info",produces = "text/html;charset=utf-8")
    @ResponseBody
    public String info(User user){
        //输出参数信息的写法: soutp
        System.out.println("user = " + user);

        return "接受到了请求";
    }

}
